import Vue from 'vue'
import VueRouter from 'vue-router'
// 一级
import Login from '@/views/login'
import Layout from '@/views/layout'
// 二级
import Home from '@/views/home'
// 工单
import Operation from '@/views/work-orders/operation.vue'
import Yunwei from '@/views/work-orders/yunwei.vue'
// 点位
import Area from '@/views/Point/area.vue'
import Partners from '@/views/Point/partners.vue'
import Point from '@/views/Point/point.vue'
// 设备
import Categories from '@/views/equipment/categories.vue'
import Condition from '@/views/equipment/condition.vue'
import Manage from '@/views/equipment/manage.vue'
// 人员
import HumanEffects from '@/views/personnel/HumanEffects.vue'
import Quantity from '@/views/personnel/quantity.vue'
import Workload from '@/views/personnel/workload.vue'
// 商品
import GoodsCategories from '@/views/goods/categories.vue'
import GoodsManage from '@/views/goods/manage.vue'
// 策略
import Strategy from '@/views/strategy'
// 订单
import Orders from '@/views/orders'
// 对账
import Reconciling from '@/views/reconciling'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/layout',
    component: Layout,
    children: [
      {
        path: '/home',
        component: Home
      },
      // 工单
      {
        path: '/operation',
        component: Operation
      },
      {
        path: '/yunwei',
        component: Yunwei
      },
      // 点位
      {
        path: '/area',
        component: Area
      },
      {
        path: '/partners',
        component: Partners
      },
      {
        path: '/point',
        component: Point
      },
      // 设备
      {
        path: '/categories',
        component: Categories
      },
      {
        path: '/condition',
        component: Condition
      },
      {
        path: '/manage',
        component: Manage
      },
      // 人员
      {
        path: '/humaneffects',
        component: HumanEffects
      },
      {
        path: '/quantity',
        component: Quantity
      },
      {
        path: '/workload',
        component: Workload
      },
      // 商品
      {
        path: '/goodscategories',
        component: GoodsCategories
      },
      {
        path: '/goodsmanage',
        component: GoodsManage
      },
      // 策略
      {
        path: '/strategy',
        component: Strategy
      },
      // 订单
      {
        path: '/orders',
        component: Orders
      },
      // 对账
      {
        path: '/reconciling',
        component: Reconciling
      }
    ]
  },
  {
    path: '/login',
    component: Login
  }
]

const router = new VueRouter({
  routes
})

export default router
